package com.atguigu.gmall.product.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class SkuSaveInfoVo {
    @JsonProperty("id")
    private Long id;
    @JsonProperty("spuId")
    private Long spuId;
    @JsonProperty("price")
    private String price;
    @JsonProperty("skuName")
    private String skuName;
    @JsonProperty("weight")
    private String weight;
    @JsonProperty("skuDesc")
    private String skuDesc;
    @JsonProperty("category3Id")
    private Integer category3Id;
    @JsonProperty("skuAttrValueList")
    private List<SkuAttrValueListDTO> skuAttrValueList;
    @JsonProperty("skuSaleAttrValueList")
    private List<?> skuSaleAttrValueList;
    @JsonProperty("skuImageList")
    private List<SkuImageListDTO> skuImageList;
    @JsonProperty("skuDefaultImg")
    private String skuDefaultImg;
    @JsonProperty("tmId")
    private Integer tmId;

    @NoArgsConstructor
    @Data
    public static class SkuAttrValueListDTO {
        @JsonProperty("attrId")
        private Long attrId;
        @JsonProperty("valueId")
        private Long valueId;
    }

    @NoArgsConstructor
    @Data
    public static class SkuImageListDTO {
        @JsonProperty("spuImgId")
        private Long spuImgId;
        @JsonProperty("imgName")
        private String imgName;
        @JsonProperty("imgUrl")
        private String imgUrl;
        @JsonProperty("isDefault")
        private Integer isDefault;
    }
}
